<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>管理</title>

    <script type="text/javascript" src="/css/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="/css/bootstrap.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css" />

</head>
<body class="container">

<nav class="navbar navbar-default">

    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
        <a class="navbar-brand" href="#">茶荼</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav">
            <li><a href="../index.php" >查看留言</a></li>
        </ul>
        <form class="navbar-form navbar-left" action="../search.php" method="post">
            <div class="form-group">
                <input type="text" class="form-control" placeholder="Search" name="search">
            </div>
            <button type="submit" class="btn btn-default">搜留言</button>
        </form>

        <ul class="nav navbar-nav navbar-right">
            <li><a href="admin.php" ><?php echo $_COOKIE["admin"];?></a></li>
            <li><a href="logout.php" >退出</a></li>
        </ul>

    </div><!-- /.navbar-collapse -->
    </div>

</nav>


<div class="row">
    <div class="col-md-3">
        <img width="200px" src='../upload/default/gy.jpg' alt="头像" class="img-thumbnail">
        <br/>
        <br/>
        欢迎:Admin
    </div>

    <div class="col-md-9" >

        <ul class="nav nav-pills ">
            <li role="presentation" class="active"><a href="comment_edit.php">留言管理</a></li>
            <li role="presentation" class="active"><a href="user_edit.php">用户管理</a></li>
            <li role="presentation" class="active"><a href="logout.php">退出</a></li>
        </ul>

        <div class="page-header">
            <h3>用户管理</h3>
        </div>

        <table class="table table-bordered  table table-hover">
            <tr>
                <td class="col-md-10">所有用户</td>
                <td class="col-md-2">操作</td>
            </tr>


            <?php
                foreach ($userData as $key => $value) {
            ?>


            <tr>
                <td><?php echo $value["user_name"];?></td>
                <td><a href='user_del.php?id=<?php echo $value["user_id"];?>'>删除</td>
            </tr>

            <?php
                }
            ?>


        </table>


    </div>
</div>




<hr/>
<div  class="text-center" >茶阁</div>
<br/>
<br/>
<br/>


</body>
</html>